<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:text="'首页-'+${@config.getKey('site.name')}"></title>
    <link th:href="@{/css/index.css}" rel="stylesheet"/>
    <link th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"/>
</head>
<!--在线客服-->
<script type='text/javascript'>
    (function(m, ei, q, i, a, j, s) {
        m[i] = m[i] || function() {
            (m[i].a = m[i].a || []).push(arguments)
        };
        j = ei.createElement(q),
            s = ei.getElementsByTagName(q)[0];
        j.async = true;
        j.charset = 'UTF-8';
        j.src = 'https://static.meiqia.com/dist/meiqia.js?_=t';
        s.parentNode.insertBefore(j, s);
    })(window, document, 'script', '_MEIQIA');
    _MEIQIA('entId', 163871);
</script>
<body>
    <!-- 注册登录 -->
    <div th:include="common/v2/head :: head"></div>

    <!--通知区域-->
    <div class="nav" >
        <div align="left">
            <marquee><span th:utext="${newOneNotice.noticeContent}"></span></marquee>
        </div>
    </div>

    <!-- 教师展示 -->
    <div class="jszs nav">
        <a class="tip" style="margin-top: 0px;">教师</a>
        <!--<div class="carousel">
            <div class="carousel_contain">
                <div class="carousel_box">
                    <span th:each="user:${userList}">
                        <a href="javascript:;" target="_blank">
                            <img th:src="(${user.avatar} == '') ? @{/img/profile.jpg} : @{${user.avatar}}">
                            <div class="names">
                                <h3 class="name_"><span th:text="${user.userName}"></span></h3>
                                <h4 class="grade_">已发布资源数：<span th:text="${user.total}"></span></h4>
                                <h4 class="grade_"><span th:text="${user.dept.deptName}"></span> <span th:text="${user.postStr}"></span></h4>
                            </div>
                        </a>
                    </span>
                </div>
            </div>
            &lt;!&ndash;<ul class="switchable_triggers">
                <span th:each="user:${userList}">
                    <li></li>
                </span>
            </ul>&ndash;&gt;
        </div>-->
        <div class="carousel">
            <div class="carousel_contain">
                <div class="carousel_box">
                    <a th:href="@{/front/article(q=${user.userName})}" th:each="user:${userList}">
                        <img th:src="(${user.avatar} == '') ? @{/img/profile.jpg} : @{${user.avatar}}" />
                        <div class="names">
                            <h3 class="name_" th:text="${user.userName}"></h3>
                            <h4 class="grade_" th:text="'已发布资源数：'+${user.total}"></h4>
                            <p class="grade_" th:text="${user.dept.deptName} +'&nbsp;&nbsp;'+  ${user.postStr}"></p>
                            <p class="content_" th:text="${user.remark}"></p>
                        </div>
                    </a>
                </div>
            </div>
            <ul class="switchable_triggers">
                <li th:each="user:${userList}"></li>
            </ul>
        </div>
    </div>

    <!-- 高校展示 -->
    <div class="gxzs nav">
        <a class="tip">高校</a>
        <span th:each="college:${collegeList}">
            <a class="item" th:href="@{/front/article(deptName=${college.deptId})}">
                <div class="img">
                    <img th:src="${college.badge}" alt="" class="img">
                </div>
                <div class="message">
                    <div class="item_name"><span th:text="${college.deptName}"></span></div>
                    <div><span th:text="${college.ename}"></span></div>
                    <div>注册教师数：<span th:text="${college.totalUser}"></span></div>
                    <div>已发布资源数：<span th:text="${college.total}"></span></div>
                </div>
            </a>
        </span>
    </div>
    <!-- 资源 -->
    <div class="zy nav">
        <a class="tip">资源</a>
        <div class="tab">
            <ul class="tab_head ">
                <li class="tab_head_current">最新内容</li>
                <li>热点文章</li>
                <li>下载推荐</li>
                <span class="tab_head_more">
                    <a href="javascript:;">more »</a>
                </span>
            </ul>
            <div class="tab_contain tab_contain_current">
                <ul>
                    <!--题目 [高校,作者,资源类别,发表日期]-->
                    <li th:each="article:${newList}" class="tab_l">
                        <a target="_blank" th:href="'/article/detail/'+${article.articleId}" th:title="${article.articleName}"
                           th:text="${#strings.length(article.articleName)>50} ? ${#strings.substring(article.articleName,0,51)} : ${article.articleName}"></a>
                        <span class="tab_t_span"> [<span th:text="${article.dept.deptName}"></span>,
                            <span th:text="${article.user.userName}"></span>,
                            <span th:text="${article.arcType.srcTypeName}"></span>,
                            <span th:text="${#dates.format(article.articlePublishDate,'yyyy-MM-dd')}"></span>]</span>
                    </li>
                </ul>
            </div>
            <div class="tab_contain">
                <ul>
                    <!--题目 [高校,作者,资源类别,发表日期]-->
                    <li th:each="article:${hotList}" class="tab_l">
                        <a target="_blank" th:href="'/article/detail/'+${article.articleId}" th:title="${article.articleName}"
                           th:text="${#strings.length(article.articleName)>50} ? ${#strings.substring(article.articleName,0,51)} : ${article.articleName}"></a>
                        <span class="tab_t_span"> [<span th:text="${article.dept.deptName}"></span>,
                            <span th:text="${article.user.userName}"></span>,
                            <span th:text="${article.arcType.srcTypeName}"></span>,
                            <span th:text="${#dates.format(article.articlePublishDate,'yyyy-MM-dd')}"></span>]</span>
                    </li>
                </ul>
            </div>
            <div class="tab_contain">
                <ul>
                    <!--题目 [高校,作者,资源类别,发表日期]-->
                    <li th:each="article:${downloadList}" class="tab_l">
                        <a target="_blank" th:href="'/article/detail/'+${article.articleId}" th:title="${article.articleName}"
                           th:text="${#strings.length(article.articleName)>50} ? ${#strings.substring(article.articleName,0,51)} : ${article.articleName} + '  ['+ ${article.total} + ']'"></a>
                        <span class="tab_t_span"> [<span th:text="${article.dept.deptName}"></span>,
                            <span th:text="${article.user.userName}"></span>,
                            <span th:text="${article.arcType.srcTypeName}"></span>,
                            <span th:text="${#dates.format(article.articlePublishDate,'yyyy-MM-dd')}"></span>]</span>
                    </li>
                </ul>
            </div>
        </div>
    </div>

    <!-- 友情链接 -->
    <div class="yqlj nav">
        <h3 class="tip">友情链接</h3>
        <div class="friendBox">
            <span th:each="link:${allLinkList}">
            <a target="_blank" th:href="${link.linkUrl}" th:title="${link.linkName}">
                <span th:text="${link.linkName}"></span>
            </a>
        </span>
        </div>
    </div>
    <!-- 版权声明 -->
    <div class="bqsm">
        <div class="sInfo">
            <a href="">Powered by <a href="/"><span th:text="${@config.getKey('site.name')}"></span></a></a>
            <a href="/tomzPage">免责申明</a>
            <a target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=admin@qqzsh.top" class="qqjb" style="color: #f40;">侵权举报</a>
            <a target="_blank" href="http://mail.qq.com/cgi-bin/qm_share?t=qm_mailme&email=admin@qqzsh.top" style="border-color: transparent;">广告合作</a>
        </div>
        <div class="sInfo">
            <span>资源总数 : <span th:text="${articleNums}"></span></span>
            <span>用户总数 ：<span th:text="${userNum}"></span></span>
            <span>下载量 ：<span th:text="${downloadNums}"></span>
        </div>
        <div class="sInfo" style="border-color: transparent;">
            Copyright © <span th:text="${@config.getKey('site.copyrightyear')}"/> <a th:href="${@config.getKey('site.url')}"><span th:text="${@config.getKey('site.url')}"></span></a> 版权所有
        </div>
        <div class="sInfo">
            <a href="http://www.beian.miit.gov.cn" target="_blank" style="border-color: transparent;"><span th:text="${@config.getKey('site.record')}"></span></a>
        </div>
    </div>

</body>
<script th:src="@{/js/jquery-3.4.1.min.js}" type="text/javascript" charset="utf-8"></script>
<script th:src="@{/js/carousel.js}" type="text/javascript" charset="utf-8"></script>
<script th:src="@{/js/tab.js}" type="text/javascript" charset="utf-8"></script>
<script th:src="@{/layui/layui.js}" type="text/javascript"></script>
<script th:src="@{/js/common.js}" type="text/javascript"></script>
<script th:inline="javascript">
    /*<![CDATA[*/
    layui.use(['element', 'form', 'laypage'], function () {
        var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
        $("#index").addClass("active");
    });

    /*]]>*/
</script>
</html>